﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using University.Workshop.Presentation.ControlWPF.TransitionControl;
using University.Workshop.Presenters.Kardex.Show;
using University.Workshop.Presenters.Square.Show;

namespace University.Workshop.Presentation.Kardex.Show
{
    /// <summary>
    /// Interaction logic for PageShowView.xaml
    /// </summary>
    public partial class PageShowView : Page,IShowKardexView
    {
        private PresenterShowKardex pShowKardex;
        public PageShowView(Model.Kardex kardex)
        {
            InitializeComponent();
            pShowKardex = new PresenterShowKardex(this, kardex);
            pShowKardex.GoStepTwo();
        }

        private void GoStepOne_Click(object sender, RoutedEventArgs e)
        {
            pShowKardex.GoStepTwo();
        }

        private void GoStepTwo_Click(object sender, RoutedEventArgs e)
        {
            pShowKardex.GoStepOne();
        }

        private void btnBack_Click(object sender, RoutedEventArgs e)
        {
            pShowKardex.GoBackPage();
        }

        private void btnNext_Click(object sender, RoutedEventArgs e)
        {
            pShowKardex.GoNextPage();
        }

        public void CallSecondPage()
        {
            PageSecondStepShowKardex pp = new PageSecondStepShowKardex(pShowKardex);
            ShowBasic = pp;
            frmContent.Navigate(pp);
        }

        public void CallFirstPage()
        {
            PageFirstStepShowKardex pp = new PageFirstStepShowKardex(pShowKardex);
            ShowBasic = pp;
            frmContent.Navigate(pp);
        }



        public IShowKardexBasicView ShowBasic { get; set; }

        private void btnCancelShow_Click(object sender, RoutedEventArgs e)
        {
            this.NavigationService.Navigate(new SearchKardex());
        }

    }
}
